/*
* $Id: QueenBeeTable.h 152 2010-09-23 18:28:55Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _QUEEN_BEE_TABLE_H_
#define _QUEEN_BEE_TABLE_H_

#include "../Table.h"
#include "../Operation.h"

class CQueenBeeTable : public CTable, public CFillContent
{
public:
	CQueenBeeTable();
	virtual ~CQueenBeeTable();
public:
	struct content : public CTable::content{
		std::tstring s_strName;
		std::tstring s_strDescription;
		std::tstring s_strFert;
		int s_nIdParentQueenBee;
		int s_nIdFamily;
		time_t s_date;
		bool s_bDead;
		QueenBee::breed s_breed;
		content();
		virtual void Clear();
		virtual void Set(const std::vector<CTableItem>& aContent);
		virtual void Free();
	}m_content;
public:
	virtual void CreateTable(IDatabase* pDatabase);
	virtual void UpdateValue(IDatabase* pDatabase);
	virtual IResult* GetValue(IDatabase* pDatabase);
	virtual void SetValue(IDatabase* pDatabase);
	virtual void DeleteValue(IDatabase* pDatabase);
	virtual IOperation::i_content* CreateContent();
};

#endif/*_QUEEN_BEE_TABLE_H_*/